﻿
using System;
using System.Text;
using System.Collections.Generic;
using System.Data;
using Kevin.Framework.Data.OrmMapping;
using Kevin.Framework.Validation;
/*------------------------------------------------------------------------
   苏州捷安信息科技有限公司 版权所有			
   文件名: TU_OnlineUser.cs
   作 者 : 席吉波
   日 期 : 2012-10-16
   备 注 : 当您对本文件更改时请写明修改人、修改日期以及事由
  ------------------------------------------------------------------------
*/
namespace JOIN.Rights.Model
{
    //TU_OnlineUser
    [Serializable]
    [TableMapping("TU_OnlineUser")]
    public class OnlineUserInfo : EntityBase
    {
        #region Constructor

        public OnlineUserInfo()
            : this("")
        { }
        public OnlineUserInfo(string connectionKey)
            : base(connectionKey)
        { }

        #endregion


        private string _userno;
        /// <summary>
        /// UserNO
        /// </summary>		
        [FieldMapping("UserNO", PrimaryKey = true)]
        public string UserNO
        {
            get
            {
                return _userno;
            }
            set
            {
                if (_userno != value)
                {
                    base.OnPropertyChanged("UserNO", _userno, value);
                    _userno = value;
                }
            }
        }

        private string _username;
        /// <summary>
        /// UserName
        /// </summary>		
        [FieldMapping("UserName")]
        public string UserName
        {
            get
            {
                return _username;
            }
            set
            {
                if (_username != value)
                {
                    base.OnPropertyChanged("UserName", _username, value);
                    _username = value;
                }
            }
        }

        private DateTime _logintime;
        /// <summary>
        /// LoginTime
        /// </summary>		
        [FieldMapping("LoginTime")]
        public DateTime LoginTime
        {
            get
            {
                return _logintime;
            }
            set
            {
                if (_logintime != value)
                {
                    base.OnPropertyChanged("LoginTime", _logintime, value);
                    _logintime = value;
                }
            }
        }

        private DateTime _logouttime;
        /// <summary>
        /// LogoutTime
        /// </summary>		
        [FieldMapping("LogoutTime")]
        public DateTime LogoutTime
        {
            get
            {
                return _logouttime;
            }
            set
            {
                if (_logouttime != value)
                {
                    base.OnPropertyChanged("LogoutTime", _logouttime, value);
                    _logouttime = value;
                }
            }
        }

        private string _remark;
        /// <summary>
        /// Remark
        /// </summary>		
        [FieldMapping("Remark")]
        public string Remark
        {
            get
            {
                return _remark;
            }
            set
            {
                if (_remark != value)
                {
                    base.OnPropertyChanged("Remark", _remark, value);
                    _remark = value;
                }
            }
        }

        private string _tokenID;
        /// <summary>
        /// 会话ID
        /// </summary>
        [FieldMapping("TokenID")]
        public string TokenID
        {
            get
            {
                return _tokenID;
            }
            set
            {
                if (_tokenID != value)
                {
                    base.OnPropertyChanged("TokenID", _tokenID, value);
                    _tokenID = value;
                }
            }
        }
        /// <summary>
        /// 用户实体属性
        /// </summary>
        [NoMapping]
        public UserInfo UserEntity
        {
            get;
            set;
        }

        string _projectID;
        [FieldMapping("ProjectID")]
        public string ProjectID
        {
            get
            {
                return _projectID;
            }
            set
            {
                if (_projectID != value)
                {
                    base.OnPropertyChanged("ProjectID", _projectID, value);
                    _projectID = value;
                }
            }
        }
        /// <summary>
        /// 当前用户的所属企业信息
        /// </summary>
        [NoMapping]
        public CompanyInfo CompanyEntity
        {
            get;
            set;
        }

        /// <summary>
        /// 用户所属机构属性
        /// </summary>
        [NoMapping]
        public OrgInfo OrgEntity
        {
            get;
            set;
        }
    }
}